import React from "react";
import dayjs from "dayjs";

const formatDate = (timestamp: any) => {
  return dayjs(timestamp).format("YYYY-MM-DD HH:mm:ss");
};

const TimeFormatter = ({ timestamp }: any) => {
  const formattedTime = formatDate(timestamp);
  return <div>{formattedTime}</div>;
};

export default TimeFormatter;
